#!/bin/sh
case "$1" in
  start)
    if [ -O /var/media ]; then
      chown video /var/media
    fi
    if [ -f /var/media/.mfgmedia ] ; then
      # remove detritus from previous mfg burnin support
      rm -f /var/media/videos/GoogleFiber.mov
      rm -f /var/media/videos/Samples/GoogleFiber.mov
      rm -f /var/media/videos/Samples/GoogleFiber1.mov
      rmdir /var/media/videos/Samples 2>/dev/null
      rm -f /var/media/.mfgmedia
    fi
    if [ -e /var/media/ManufacturingBurnin.mov ]; then
      # remove detritus from manufacturing
      rm -f /var/media/ManufacturingBurnin.mov
    fi
    ;;
  stop)
    ;;
  restart)
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
esac
